{% extends "layout.html" %}
{% from "macros/_form.html" import render_errors %}
{% import "utils/_ueditor.html" as ueditor%}
{%- block content %}

<form action="" method="post" class="form-horizontal">
    {{ form.hidden_tag() }}
    <div class="form-group">
        <label class="col-sm-2 control-label">Title</label>
        <div class="col-sm-3">
            {{form.title(size=30,class="form-control")}}
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label">Content</label>
        <div class="col-sm-5">
        <textarea name="content" id="editor" style="width:1024px;height:500px;">{{form.content.data if form.content.data is not none }}</textarea>
            {{ueditor}}
            <!-- {{form.content(rows=10, class="form-control")}} -->
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">Add Tags</label>
        <div class="col-sm-3">
            {{form.tags(size=30,class="form-control")}} (Use "," seperated)
        </div>
    </div>
    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
            <button type="submit" class="btn btn-default">Submit</button>
        </div>
    </div>
</form>
{%- endblock %}
